3.4.14 \(\int \frac {\cos ^6(x)}{(a+b \sin ^2(x))^2} \, dx\) [314]

Optimal. Leaf size=113 \[ \frac {(4 a+5 b) x}{2 b^3}-\frac {(4 a-b) (a+b)^{3/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a}}\right )}{2 a^{3/2} b^3}-\frac {\cos (x) \sin (x)}{2 b \left (a+(a+b) \tan ^2(x)\right )}+\frac {(a+b) (2 a+b) \tan (x)}{2 a b^2 \left (a+(a+b) \tan ^2(x)\right )} \]

[Out]

1/2*(4*a+5*b)*x/b^3-1/2*(4*a-b)*(a+b)^(3/2)*arctan((a+b)^(1/2)*tan(x)/a^(1/2))/a^(3/2)/b^3-1/2*cos(x)*sin(x)/b
/(a+(a+b)*tan(x)^2)+1/2*(a+b)*(2*a+b)*tan(x)/a/b^2/(a+(a+b)*tan(x)^2)

________________________________________________________________________________________

Rubi [A]
time = 0.14, antiderivative size = 113, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3270, 425, 541, 536, 209, 211} \begin {gather*} -\frac {(4 a-b) (a+b)^{3/2} \text {ArcTan}\left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a}}\right )}{2 a^{3/2} b^3}+\frac {x (4 a+5 b)}{2 b^3}+\frac {(2 a+b) (a+b) \tan (x)}{2 a b^2 \left ((a+b) \tan ^2(x)+a\right )}-\frac {\sin (x) \cos (x)}{2 b \left ((a+b) \tan ^2(x)+a\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[x]^6/(a + b*Sin[x]^2)^2,x]

[Out]

((4*a + 5*b)*x)/(2*b^3) - ((4*a - b)*(a + b)^(3/2)*ArcTan[(Sqrt[a + b]*Tan[x])/Sqrt[a]])/(2*a^(3/2)*b^3) - (Co
s[x]*Sin[x])/(2*b*(a + (a + b)*Tan[x]^2)) + ((a + b)*(2*a + b)*Tan[x])/(2*a*b^2*(a + (a + b)*Tan[x]^2))

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 425

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(-b)*x*(a + b*x^n)^(p + 1)*
((c + d*x^n)^(q + 1)/(a*n*(p + 1)*(b*c - a*d))), x] + Dist[1/(a*n*(p + 1)*(b*c - a*d)), Int[(a + b*x^n)^(p + 1
)*(c + d*x^n)^q*Simp[b*c + n*(p + 1)*(b*c - a*d) + d*b*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c,
d, n, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  !( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomi
alQ[a, b, c, d, n, p, q, x]

Rule 536

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 541

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> Simp[(
-(b*e - a*f))*x*(a + b*x^n)^(p + 1)*((c + d*x^n)^(q + 1)/(a*n*(b*c - a*d)*(p + 1))), x] + Dist[1/(a*n*(b*c - a
*d)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*
f)*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rule 3270

Int[cos[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = FreeF
actors[Tan[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1), x], x, T
an[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] && IntegerQ[p]

Rubi steps

\begin {align*} \int \frac {\cos ^6(x)}{\left (a+b \sin ^2(x)\right )^2} \, dx &=\text {Subst}\left (\int \frac {1}{\left (1+x^2\right )^2 \left (a+(a+b) x^2\right )^2} \, dx,x,\tan (x)\right )\\ &=-\frac {\cos (x) \sin (x)}{2 b \left (a+(a+b) \tan ^2(x)\right )}+\frac {\text {Subst}\left (\int \frac {a+2 b-3 (a+b) x^2}{\left (1+x^2\right ) \left (a+(a+b) x^2\right )^2} \, dx,x,\tan (x)\right )}{2 b}\\ &=-\frac {\cos (x) \sin (x)}{2 b \left (a+(a+b) \tan ^2(x)\right )}+\frac {(a+b) (2 a+b) \tan (x)}{2 a b^2 \left (a+(a+b) \tan ^2(x)\right )}-\frac {\text {Subst}\left (\int \frac {2 \left (2 a^2+2 a b-b^2\right )-2 (a+b) (2 a+b) x^2}{\left (1+x^2\right ) \left (a+(a+b) x^2\right )} \, dx,x,\tan (x)\right )}{4 a b^2}\\ &=-\frac {\cos (x) \sin (x)}{2 b \left (a+(a+b) \tan ^2(x)\right )}+\frac {(a+b) (2 a+b) \tan (x)}{2 a b^2 \left (a+(a+b) \tan ^2(x)\right )}-\frac {\left ((4 a-b) (a+b)^2\right ) \text {Subst}\left (\int \frac {1}{a+(a+b) x^2} \, dx,x,\tan (x)\right )}{2 a b^3}+\frac {(4 a+5 b) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (x)\right )}{2 b^3}\\ &=\frac {(4 a+5 b) x}{2 b^3}-\frac {(4 a-b) (a+b)^{3/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a}}\right )}{2 a^{3/2} b^3}-\frac {\cos (x) \sin (x)}{2 b \left (a+(a+b) \tan ^2(x)\right )}+\frac {(a+b) (2 a+b) \tan (x)}{2 a b^2 \left (a+(a+b) \tan ^2(x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.22, size = 90, normalized size = 0.80 \begin {gather*} \frac {2 (4 a+5 b) x-\frac {2 (4 a-b) (a+b)^{3/2} \tan ^{-1}\left (\frac {\sqrt {a+b} \tan (x)}{\sqrt {a}}\right )}{a^{3/2}}+b \sin (2 x)+\frac {2 b (a+b)^2 \sin (2 x)}{a (2 a+b-b \cos (2 x))}}{4 b^3} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]^6/(a + b*Sin[x]^2)^2,x]

[Out]

(2*(4*a + 5*b)*x - (2*(4*a - b)*(a + b)^(3/2)*ArcTan[(Sqrt[a + b]*Tan[x])/Sqrt[a]])/a^(3/2) + b*Sin[2*x] + (2*
b*(a + b)^2*Sin[2*x])/(a*(2*a + b - b*Cos[2*x])))/(4*b^3)

________________________________________________________________________________________

Maple [A]
time = 0.25, size = 100, normalized size = 0.88

method result size
default \(\frac {\frac {b \tan \left (x \right )}{2 \left (\tan ^{2}\left (x \right )\right )+2}+\frac {\left (4 a +5 b \right ) \arctan \left (\tan \left (x \right )\right )}{2}}{b^{3}}-\frac {\left (a +b \right )^{2} \left (-\frac {b \tan \left (x \right )}{2 a \left (a \left (\tan ^{2}\left (x \right )\right )+b \left (\tan ^{2}\left (x \right )\right )+a \right )}+\frac {\left (4 a -b \right ) \arctan \left (\frac {\left (a +b \right ) \tan \left (x \right )}{\sqrt {a \left (a +b \right )}}\right )}{2 a \sqrt {a \left (a +b \right )}}\right )}{b^{3}}\) \(100\)
risch \(\frac {2 a x}{b^{3}}+\frac {5 x}{2 b^{2}}-\frac {i {\mathrm e}^{2 i x}}{8 b^{2}}+\frac {i {\mathrm e}^{-2 i x}}{8 b^{2}}-\frac {i \left (2 a^{3} {\mathrm e}^{2 i x}+5 a^{2} b \,{\mathrm e}^{2 i x}+4 a \,b^{2} {\mathrm e}^{2 i x}+b^{3} {\mathrm e}^{2 i x}-a^{2} b -2 a \,b^{2}-b^{3}\right )}{a \,b^{3} \left (-b \,{\mathrm e}^{4 i x}+4 a \,{\mathrm e}^{2 i x}+2 b \,{\mathrm e}^{2 i x}-b \right )}+\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right )}{b^{3}}+\frac {3 \sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right )}{4 a \,b^{2}}-\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right )}{4 a^{2} b}-\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right )}{b^{3}}-\frac {3 \sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right )}{4 a \,b^{2}}+\frac {\sqrt {-a \left (a +b \right )}\, \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right )}{4 a^{2} b}\) \(395\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^6/(a+b*sin(x)^2)^2,x,method=_RETURNVERBOSE)

[Out]

1/b^3*(1/2*b*tan(x)/(tan(x)^2+1)+1/2*(4*a+5*b)*arctan(tan(x)))-(a+b)^2/b^3*(-1/2/a*b*tan(x)/(a*tan(x)^2+b*tan(
x)^2+a)+1/2*(4*a-b)/a/(a*(a+b))^(1/2)*arctan((a+b)*tan(x)/(a*(a+b))^(1/2)))

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 150, normalized size = 1.33 \begin {gather*} \frac {{\left (2 \, a^{2} + 3 \, a b + b^{2}\right )} \tan \left (x\right )^{3} + {\left (2 \, a^{2} + 2 \, a b + b^{2}\right )} \tan \left (x\right )}{2 \, {\left ({\left (a^{2} b^{2} + a b^{3}\right )} \tan \left (x\right )^{4} + a^{2} b^{2} + {\left (2 \, a^{2} b^{2} + a b^{3}\right )} \tan \left (x\right )^{2}\right )}} + \frac {{\left (4 \, a + 5 \, b\right )} x}{2 \, b^{3}} - \frac {{\left (4 \, a^{3} + 7 \, a^{2} b + 2 \, a b^{2} - b^{3}\right )} \arctan \left (\frac {{\left (a + b\right )} \tan \left (x\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{2 \, \sqrt {{\left (a + b\right )} a} a b^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^6/(a+b*sin(x)^2)^2,x, algorithm="maxima")

[Out]

1/2*((2*a^2 + 3*a*b + b^2)*tan(x)^3 + (2*a^2 + 2*a*b + b^2)*tan(x))/((a^2*b^2 + a*b^3)*tan(x)^4 + a^2*b^2 + (2
*a^2*b^2 + a*b^3)*tan(x)^2) + 1/2*(4*a + 5*b)*x/b^3 - 1/2*(4*a^3 + 7*a^2*b + 2*a*b^2 - b^3)*arctan((a + b)*tan
(x)/sqrt((a + b)*a))/(sqrt((a + b)*a)*a*b^3)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 204 vs. \(2 (97) = 194\).
time = 0.46, size = 491, normalized size = 4.35 \begin {gather*} \left [\frac {4 \, {\left (4 \, a^{2} b + 5 \, a b^{2}\right )} x \cos \left (x\right )^{2} + {\left (4 \, a^{3} + 7 \, a^{2} b + 2 \, a b^{2} - b^{3} - {\left (4 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \cos \left (x\right )^{2}\right )} \sqrt {-\frac {a + b}{a}} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (x\right )^{4} - 2 \, {\left (4 \, a^{2} + 5 \, a b + b^{2}\right )} \cos \left (x\right )^{2} - 4 \, {\left ({\left (2 \, a^{2} + a b\right )} \cos \left (x\right )^{3} - {\left (a^{2} + a b\right )} \cos \left (x\right )\right )} \sqrt {-\frac {a + b}{a}} \sin \left (x\right ) + a^{2} + 2 \, a b + b^{2}}{b^{2} \cos \left (x\right )^{4} - 2 \, {\left (a b + b^{2}\right )} \cos \left (x\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right ) - 4 \, {\left (4 \, a^{3} + 9 \, a^{2} b + 5 \, a b^{2}\right )} x + 4 \, {\left (a b^{2} \cos \left (x\right )^{3} - {\left (2 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{8 \, {\left (a b^{4} \cos \left (x\right )^{2} - a^{2} b^{3} - a b^{4}\right )}}, \frac {2 \, {\left (4 \, a^{2} b + 5 \, a b^{2}\right )} x \cos \left (x\right )^{2} - {\left (4 \, a^{3} + 7 \, a^{2} b + 2 \, a b^{2} - b^{3} - {\left (4 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \cos \left (x\right )^{2}\right )} \sqrt {\frac {a + b}{a}} \arctan \left (\frac {{\left ({\left (2 \, a + b\right )} \cos \left (x\right )^{2} - a - b\right )} \sqrt {\frac {a + b}{a}}}{2 \, {\left (a + b\right )} \cos \left (x\right ) \sin \left (x\right )}\right ) - 2 \, {\left (4 \, a^{3} + 9 \, a^{2} b + 5 \, a b^{2}\right )} x + 2 \, {\left (a b^{2} \cos \left (x\right )^{3} - {\left (2 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \cos \left (x\right )\right )} \sin \left (x\right )}{4 \, {\left (a b^{4} \cos \left (x\right )^{2} - a^{2} b^{3} - a b^{4}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^6/(a+b*sin(x)^2)^2,x, algorithm="fricas")

[Out]

[1/8*(4*(4*a^2*b + 5*a*b^2)*x*cos(x)^2 + (4*a^3 + 7*a^2*b + 2*a*b^2 - b^3 - (4*a^2*b + 3*a*b^2 - b^3)*cos(x)^2
)*sqrt(-(a + b)/a)*log(((8*a^2 + 8*a*b + b^2)*cos(x)^4 - 2*(4*a^2 + 5*a*b + b^2)*cos(x)^2 - 4*((2*a^2 + a*b)*c
os(x)^3 - (a^2 + a*b)*cos(x))*sqrt(-(a + b)/a)*sin(x) + a^2 + 2*a*b + b^2)/(b^2*cos(x)^4 - 2*(a*b + b^2)*cos(x
)^2 + a^2 + 2*a*b + b^2)) - 4*(4*a^3 + 9*a^2*b + 5*a*b^2)*x + 4*(a*b^2*cos(x)^3 - (2*a^2*b + 3*a*b^2 + b^3)*co
s(x))*sin(x))/(a*b^4*cos(x)^2 - a^2*b^3 - a*b^4), 1/4*(2*(4*a^2*b + 5*a*b^2)*x*cos(x)^2 - (4*a^3 + 7*a^2*b + 2
*a*b^2 - b^3 - (4*a^2*b + 3*a*b^2 - b^3)*cos(x)^2)*sqrt((a + b)/a)*arctan(1/2*((2*a + b)*cos(x)^2 - a - b)*sqr
t((a + b)/a)/((a + b)*cos(x)*sin(x))) - 2*(4*a^3 + 9*a^2*b + 5*a*b^2)*x + 2*(a*b^2*cos(x)^3 - (2*a^2*b + 3*a*b
^2 + b^3)*cos(x))*sin(x))/(a*b^4*cos(x)^2 - a^2*b^3 - a*b^4)]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)**6/(a+b*sin(x)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]
time = 0.49, size = 175, normalized size = 1.55 \begin {gather*} \frac {{\left (4 \, a + 5 \, b\right )} x}{2 \, b^{3}} - \frac {{\left (4 \, a^{3} + 7 \, a^{2} b + 2 \, a b^{2} - b^{3}\right )} {\left (\pi \left \lfloor \frac {x}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac {a \tan \left (x\right ) + b \tan \left (x\right )}{\sqrt {a^{2} + a b}}\right )\right )}}{2 \, \sqrt {a^{2} + a b} a b^{3}} + \frac {2 \, a^{2} \tan \left (x\right )^{3} + 3 \, a b \tan \left (x\right )^{3} + b^{2} \tan \left (x\right )^{3} + 2 \, a^{2} \tan \left (x\right ) + 2 \, a b \tan \left (x\right ) + b^{2} \tan \left (x\right )}{2 \, {\left (a \tan \left (x\right )^{4} + b \tan \left (x\right )^{4} + 2 \, a \tan \left (x\right )^{2} + b \tan \left (x\right )^{2} + a\right )} a b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)^6/(a+b*sin(x)^2)^2,x, algorithm="giac")

[Out]

1/2*(4*a + 5*b)*x/b^3 - 1/2*(4*a^3 + 7*a^2*b + 2*a*b^2 - b^3)*(pi*floor(x/pi + 1/2)*sgn(2*a + 2*b) + arctan((a
*tan(x) + b*tan(x))/sqrt(a^2 + a*b)))/(sqrt(a^2 + a*b)*a*b^3) + 1/2*(2*a^2*tan(x)^3 + 3*a*b*tan(x)^3 + b^2*tan
(x)^3 + 2*a^2*tan(x) + 2*a*b*tan(x) + b^2*tan(x))/((a*tan(x)^4 + b*tan(x)^4 + 2*a*tan(x)^2 + b*tan(x)^2 + a)*a
*b^2)

________________________________________________________________________________________

Mupad [B]
time = 14.70, size = 463, normalized size = 4.10 \begin {gather*} \frac {\frac {\mathrm {tan}\left (x\right )\,\left (2\,a^2+2\,a\,b+b^2\right )}{2\,a\,b^2}+\frac {{\mathrm {tan}\left (x\right )}^3\,\left (a+b\right )\,\left (2\,a+b\right )}{2\,a\,b^2}}{\left (a+b\right )\,{\mathrm {tan}\left (x\right )}^4+\left (2\,a+b\right )\,{\mathrm {tan}\left (x\right )}^2+a}-\frac {\ln \left (a^2\,b-\mathrm {tan}\left (x\right )\,\sqrt {-a^3\,{\left (a+b\right )}^3}+a^3\right )\,\sqrt {-a^3\,{\left (a+b\right )}^3}\,\left (4\,a-b\right )}{4\,a^3\,b^3}+\frac {\ln \left (\mathrm {tan}\left (x\right )\,\sqrt {-a^3\,{\left (a+b\right )}^3}+a^2\,b+a^3\right )\,\left (a-\frac {b}{4}\right )\,\sqrt {-a^3\,{\left (a+b\right )}^3}}{a^3\,b^3}-\frac {\mathrm {atan}\left (\frac {41\,\mathrm {tan}\left (x\right )}{2\,\left (\frac {131\,a}{4\,b}+\frac {11\,b}{4\,a}-\frac {5\,b^2}{4\,a^2}+\frac {85\,a^2}{4\,b^2}+\frac {5\,a^3}{b^3}+\frac {41}{2}\right )}+\frac {11\,\mathrm {tan}\left (x\right )}{4\,\left (\frac {41\,a}{2\,b}-\frac {5\,b}{4\,a}+\frac {131\,a^2}{4\,b^2}+\frac {85\,a^3}{4\,b^3}+\frac {5\,a^4}{b^4}+\frac {11}{4}\right )}+\frac {131\,a\,\mathrm {tan}\left (x\right )}{4\,\left (\frac {131\,a}{4}+\frac {41\,b}{2}+\frac {11\,b^2}{4\,a}+\frac {85\,a^2}{4\,b}-\frac {5\,b^3}{4\,a^2}+\frac {5\,a^3}{b^2}\right )}-\frac {5\,b\,\mathrm {tan}\left (x\right )}{4\,\left (\frac {11\,a}{4}-\frac {5\,b}{4}+\frac {41\,a^2}{2\,b}+\frac {131\,a^3}{4\,b^2}+\frac {85\,a^4}{4\,b^3}+\frac {5\,a^5}{b^4}\right )}+\frac {85\,a^2\,\mathrm {tan}\left (x\right )}{4\,\left (\frac {131\,a\,b}{4}+\frac {85\,a^2}{4}+\frac {41\,b^2}{2}+\frac {11\,b^3}{4\,a}+\frac {5\,a^3}{b}-\frac {5\,b^4}{4\,a^2}\right )}+\frac {5\,a^3\,\mathrm {tan}\left (x\right )}{\frac {131\,a\,b^2}{4}+\frac {85\,a^2\,b}{4}+5\,a^3+\frac {41\,b^3}{2}+\frac {11\,b^4}{4\,a}-\frac {5\,b^5}{4\,a^2}}\right )\,\left (a\,1{}\mathrm {i}+\frac {b\,5{}\mathrm {i}}{4}\right )\,2{}\mathrm {i}}{b^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^6/(a + b*sin(x)^2)^2,x)

[Out]

((tan(x)*(2*a*b + 2*a^2 + b^2))/(2*a*b^2) + (tan(x)^3*(a + b)*(2*a + b))/(2*a*b^2))/(a + tan(x)^2*(2*a + b) +
tan(x)^4*(a + b)) - (atan((41*tan(x))/(2*((131*a)/(4*b) + (11*b)/(4*a) - (5*b^2)/(4*a^2) + (85*a^2)/(4*b^2) +
(5*a^3)/b^3 + 41/2)) + (11*tan(x))/(4*((41*a)/(2*b) - (5*b)/(4*a) + (131*a^2)/(4*b^2) + (85*a^3)/(4*b^3) + (5*
a^4)/b^4 + 11/4)) + (131*a*tan(x))/(4*((131*a)/4 + (41*b)/2 + (11*b^2)/(4*a) + (85*a^2)/(4*b) - (5*b^3)/(4*a^2
) + (5*a^3)/b^2)) - (5*b*tan(x))/(4*((11*a)/4 - (5*b)/4 + (41*a^2)/(2*b) + (131*a^3)/(4*b^2) + (85*a^4)/(4*b^3
) + (5*a^5)/b^4)) + (85*a^2*tan(x))/(4*((131*a*b)/4 + (85*a^2)/4 + (41*b^2)/2 + (11*b^3)/(4*a) + (5*a^3)/b - (
5*b^4)/(4*a^2))) + (5*a^3*tan(x))/((131*a*b^2)/4 + (85*a^2*b)/4 + 5*a^3 + (41*b^3)/2 + (11*b^4)/(4*a) - (5*b^5
)/(4*a^2)))*(a*1i + (b*5i)/4)*2i)/b^3 - (log(a^2*b - tan(x)*(-a^3*(a + b)^3)^(1/2) + a^3)*(-a^3*(a + b)^3)^(1/
2)*(4*a - b))/(4*a^3*b^3) + (log(tan(x)*(-a^3*(a + b)^3)^(1/2) + a^2*b + a^3)*(a - b/4)*(-a^3*(a + b)^3)^(1/2)
)/(a^3*b^3)

________________________________________________________________________________________